<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增稿件管理')"/>
    <script type="text/javascript" th:src="@{/pdata/pdata.js}"></script>
    <th:block th:include="include :: bootstrap-fileinput-css"/>
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />

</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-paper-add">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">稿件名称：</label>
            <div class="col-sm-8">
                <input name="paperName" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">客户名称：</label>
            <div class="col-sm-8">
                <div class="input-group">
                    <input type="text" class="form-control" name="customerName" id="customerName" required>
                    <input name="customerId" id="customerId" type="hidden" required>
                    <div class="input-group-btn">
                        <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu dropdown-menu-right" role="menu">
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">原始链接：</label>
            <div class="col-sm-8">
                <input name="originalLink" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">上传稿件：</label>
            <div class="col-sm-8">
                <input type="hidden" name="uploadFile">
                <div class="file-loading">
                    <input class="form-control file-upload" id="uploadFile" name="file" type="file">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">回款周期：</label>
            <div class="col-sm-8">
                <input name="paybackPeriod" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea name="remark" class="form-control"></textarea>
            </div>
        </div>
        <div class="row">
            要发布的媒体
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </form>

    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="mediaSearch">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>业务类型：</label>
                            <select name="mediaType"
                                    th:with="type=${@dict.getType('work_paper_type')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>分类：</label>
                            <select class="form-control"  name="category"
                                    th:with="type=${@dict.getType('work_category')}">
                                <option value="">所有</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>行业：</label>

                            <select class="form-control"  name="industry"
                                    th:with="type=${@dict.getType('work_industry')}">
                                <option value="">所有</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>媒体名称：</label>
                            <input type="text" name="mediaName"/>
                        </li>
                        <li>
                            <label>平台：</label>
                            <select class="form-control"  name="platform"
                                    th:with="type=${@dict.getType('work_platform')}">
                                <option value="">所有</option>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                        th:value="${dict.dictValue}"></option>
                            </select>
                        </li>
                        <li>
                            <label>价格范围：</label>
                            <input type="text" name="beginPrice"/>
                            <span>-</span>
                            <input type="text" name="endPrice"/>
                        </li>

                        <li>
                            <label>地区：</label>
                            <select name="province" id="province" class="form-control">
                            </select>
                        </li>
                        <li>
                            <select name="city" id="city" class="form-control">
                            </select>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="commonSearch();"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$('#mediaSearch')[0].reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                            <a class="btn btn-success" onclick="insertRow()"><i class="fa fa-plus"></i> 批量选择</a>
                            <a class="btn btn-success" onclick="removeRow()"><i class="fa fa-plus"></i> 批量撤销</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table id="media-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<th:block th:include="include :: bootstrap-suggest-js"/>
<th:block th:include="include :: bootstrap-typeahead-js"/>
<th:block th:include="include :: select2-js" />
<th:block th:include="include :: bootstrap-select-js" />
<script th:src="@{/js/jquery.tmpl.js}"></script>
<script th:inline="javascript">
    var prefix = ctx + "work/paper"
    var categoryDatas = [[${@dict.getType('work_category')}]];
    var authDatas = [[${@dict.getType('work_auth')}]];
    var industryDatas = [[${@dict.getType('work_industry')}]];
    var includedDatas = [[${@dict.getType('work_included')}]];
    var linkDatas = [[${@dict.getType('work_publish_link')}]];
    var weekendPressDatas = [[${@dict.getType('work_publish_paper')}]];
    var publishDatas = [[${@dict.getType('work_publish_date')}]];
    var plusVDatas = [[${@dict.getType('work_plus_v')}]];
    var isMasterDatas = [[${@dict.getType('sys_yes_no')}]];
    var platformDatas = [[${@dict.getType('work_platform')}]];
    var isDirectDatas = [[${@dict.getType('sys_yes_no')}]];
    var vOriginalDatas = [[${@dict.getType('work_original_v')}]];
    var priceDatas = [[${@dict.getType('work_price_type')}]];
    var paperDatas = [[${@dict.getType('work_paper_type')}]];


    $("#form-paper-add").validate({
        focusCleanup: true
    });

    function submitHandler() {

        if($("#customerId").val()==''){
            $.modal.alertWarning("客户必填！");
            return;
        }
        var data = $("#bootstrap-table").bootstrapTable('getData');
        if(data.length==0){
            $.modal.alertWarning("请至少选择一条媒体信息！");
            return;
        }
        if ($.validate.form()) {
            var data = $("#form-paper-add").serializeArray();


            $.operate.saveModal(prefix + "/add", data,function (result){
                $.operate.successCallback(result);
            });
        }
    }


    $(".file-upload").fileinput({
        uploadUrl: ctx + 'common/upload',
        maxFileCount: 1,
        autoReplace: true,
        showPreview:false
    }).on('fileuploaded', function (event, data, previewId, index) {
        $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
    }).on('fileremoved', function (event, id, index) {
        $("input[name='" + event.currentTarget.id + "']").val('')
    })


    var testBsSuggest = $("#customerName").bsSuggest({
        url: "/work/customer/query",
        showBtn: false,
        idField: "customerId",
        keyField: "customerName",
        effectiveFields: ["customerId", "customerName", "companyName", "createTime"],
        effectiveFieldsAlias: {customerId: "ID", customerName: "客户名称", companyName: "公司名称", createTime: "登记时间"},
        showHeader: true
    }).on('onDataRequestSuccess', function (e, result) {
        console.log('onDataRequestSuccess: ', result);
    }).on('onSetSelectValue', function (e, keyword) {
        console.log('onSetSelectValue: ', keyword.id);
        $("#customerId").val(keyword.id);
    }).on('onUnsetSelectValue', function (e) {
        console.log("onUnsetSelectValue");
    });

    $(function () {
        var html = "<option value=''>== 请选择 ==</option>";
        $("#city").append(html);

        $.each(pdata, function (idx, item) {
            if (parseInt(item.level) == 0) {
                html += "<option value='" + item.names + "' exid='" + item.code + "'>" + item.names + "</option>";
            }
        });
        $("#province").append(html);

        $("#province").change(function () {
            if ($(this).val() == "") return;
            $("#city option").remove();

            var code = $(this).find("option:selected").attr("exid");
            code = code.substring(0, 2);
            var html = "<option value=''>== 请选择 ==</option>";

            $.each(pdata, function (idx, item) {
                if (parseInt(item.level) == 1 && code == item.code.substring(0, 2)) {
                    html += "<option value='" + item.names + "' exid='" + item.code + "'>" + item.names + "</option>";
                }
            });
            $("#city").append(html);
        });


        var options = {
            showSearch: false,
            showRefresh: false,
            showToggle: false,
            showColumns: false,
            pagination: false,
            uniqueId: "id",
            height: 400,
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '序号'

                },
                {
                    field: 'mediaId',
                    title: '编号',
                    formatter: function (value, row, index) {

                        var columnId = $.common.sprintf("<input type='hidden' name='papers[%s].mediaId' value='%s'>", index, value);
                        return columnId + value;
                    }
                },
                {
                    field: 'paperType',
                    title: '业务类型',
                    formatter: function (value, row, index) {
                        var pt = $.common.sprintf("<input type='hidden' name='papers[%s].paperType' value='%s'>", index, value);
                        return pt + $.table.selectDictLabel(paperDatas, value);
                    }
                },

                {
                    field: 'platform',
                    title: '平台',
                    formatter: function (value, row, index) {
                        return $.table.selectDictLabel(platformDatas, value);
                    }
                },
                {
                    field: 'mediaName',
                    title: '媒体名称'

                },
                {
                    field: 'paperPrice',// var fix_amountTest=/^(([1-9]\d*)|\d)(\.\d{1,2})?$/;
                    title: '总价'
                   ,
                    formatter: function (value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='papers[%s].paperPrice' value='%s' readonly >", index, value);
                        return html;
                    }
                },
                {
                    field: 'priceType',
                    title: '价格类型',
                    formatter: function (value, row, index) {
                        var data = [{index: index, type: value, r: row}];
                        return $("#priceTypeTpl").tmpl(data).html();
                    }

                },

                {
                    field: 'words',
                    title: '字数',
                    formatter: function (value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='papers[%s].words' value='%s'>", index, value);
                        return html;
                    }
                },
                {
                    field: 'actualPrice',
                    title: '实际总价',
                    formatter: function (value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='papers[%s].actualPrice' value='%s'>", index, value);
                        return html;
                    }
                }, {
                    field: 'flowDetail',
                    title: '添加刷量详细'
                }, {
                    field: 'flowRemark',
                    title: '刷量内容备注',
                    formatter: function (value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='papers[%s].flowRemark' value='%s'>", index, value);
                        return html;
                    }
                },
                {
                    field: 'flowrLink',
                    title: '刷量链接(不发稿，单独刷量时填写)',
                    formatter: function (value, row, index) {
                        var html = $.common.sprintf("<input class='form-control' type='text' name='papers[%s].flowrLink' value='%s'>", index, value);
                        return html;
                    }
                },
            ]
        };

        $.table.init(options);


    });

    /* 新增表格行 */
    function insertRow() {


        var row = $("#media-table").bootstrapTable('getSelections');

        //(new Date().getTime() + Math.floor(Math.random() * Math.pow(10, 15))).toString(36),
        $(row).each(function (i) {
            var data = $("#bootstrap-table").bootstrapTable('getRowByUniqueId', $("#mediaSearch [name='mediaType']").val() + "-" + row[i].mediaId);
            if(data==null){
                $("#bootstrap-table").bootstrapTable('append', {
                        id: $("#mediaSearch [name='mediaType']").val() + "-" + row[i].mediaId,
                        mediaId: row[i].mediaId,
                        paperType: $("#mediaSearch [name='mediaType']").val(),
                        platform: (row[i].platform) ? row[i].platform : '',
                        mediaName: row[i].mediaName,
                        paperPrice: (row[i].price) ? row[i].price : '',
                        priceType: '',
                        words: '',
                        actualPrice: '',
                        flowRemark: '',
                        flowrLink: ''

                    }
                )
            }

        })


    }

    function removeRow() {

        //var ids = $.table.selectColumns("id");
        var row = $("#bootstrap-table").bootstrapTable('getSelections');
        if (row.length == 0) {
            $.modal.alertWarning("请至少选择一条记录");
            return;
        }
        var ids = $.map(row, function (r) {
            return $.common.getItemField(r, "id");
        });
        $("#bootstrap-table").bootstrapTable('remove', {
            field: 'id',
            values: ids
        })

    }

    function priceChange(i, obj) {

        var r = $("#bootstrap-table").bootstrapTable('getData')[i];
        if (r.paperType == "2" || r.paperType == "3") {

            $.ajax({
                type: "post",
                url: prefix + "/getprice",
                data: {
                    "mediaId": r.mediaId,
                    "mediaType": r.paperType,
                    "priceType": obj
                },
                dataType: "JSON",
                success: function (data, textStatus, jqXHR) {

                    $("#bootstrap-table").bootstrapTable('updateRow', {
                        index: i, // 你想修改哪行，0表示第一行
                        row: {
                            paperPrice: data.data,
                            priceType: obj

                        }
                    });
                }
            });

        }

    }

    function queryParams(params) {
        var search = $.table.queryParams(params);
        search.category = $("#mediaSearch [name='category']").val();
        search.industry = $("#mediaSearch [name='industry']").val();
        search.mediaName = $("#mediaSearch [name='mediaName']").val();
        search.platform = $("#mediaSearch [name='platform']").val();
        search.province = $("#mediaSearch [name='province']").val();
        search.city = $("#mediaSearch [name='city']").val();
        search.params = {};
        search.params["beginPrice"] = $("#mediaSearch [name='beginPrice']").val();
        search.params["endPrice"] = $("#mediaSearch [name='endPrice']").val();
        return search;


    }


    function commonSearch() {
        var mt = $("#mediaSearch [name='mediaType']").val();
        var pre = ctx;
        var options = {};

        switch (mt) {
            case "1":
                pre = pre + "work/net";
                options = {
                    id: "media-table",
                    url: pre + "/list",
                    queryParams: queryParams,
                    showSearch: false,
                    showRefresh: false,
                    showToggle: false,
                    showColumns: false,
                    columns: [{
                        checkbox: true
                    },
                        {
                            field: 'mediaId',
                            title: '媒体ID'
                        },
                        {
                            field: 'mediaName',
                            title: '媒体名称'
                        },
                        {
                            field: 'province',
                            title: '省份'
                        },
                        {
                            field: 'city',
                            title: '地市'
                        },
                        {
                            field: 'category',
                            title: '分类',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(categoryDatas, value);
                            }
                        },
                        {
                            field: 'industry',
                            title: '行业',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(industryDatas, value);
                            }
                        },
                        {
                            field: 'included',
                            title: '收录',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(includedDatas, value);
                            }
                        },
                        {
                            field: 'price',
                            title: '价格'
                        },
                        {
                            field: 'link',
                            title: '发布链接',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(linkDatas, value);
                            }
                        },
                        {
                            field: 'weekendPress',
                            title: '周末发稿',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(weekendPressDatas, value);
                            }
                        },
                        {
                            field: 'mediaCase',
                            title: '案例'
                        },
                        {
                            field: 'publish',
                            title: '出稿日期',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(publishDatas, value);
                            }
                        },
                        {
                            field: 'createBy',
                            title: '登记人'
                        },
                        {
                            field: 'remark',
                            title: '备注'
                        }]
                };
                $.table.destroy('media-table');
                $.table.init(options);

                break;
            case "2":
                pre = pre + "work/wb";
                options = {
                    url: pre + "/list",
                    id: "media-table",
                    queryParams: queryParams,
                    showSearch: false,
                    showRefresh: false,
                    showToggle: false,
                    showColumns: false,
                    columns: [{
                        checkbox: true
                    },
                        {
                            field: 'mediaId',
                            title: '媒体ID'
                        },
                        {
                            field: 'mediaName',
                            title: '微博名称'
                        },
                        {
                            field: 'province',
                            title: '省份'
                        },
                        {
                            field: 'city',
                            title: '地市'
                        },
                        {
                            field: 'industry',
                            title: '行业',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(industryDatas, value);
                            }
                        },
                        {
                            field: 'plusV',
                            title: '加V',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(plusVDatas, value);
                            }
                        },
                        {
                            field: 'fans',
                            title: '粉丝数(万)'
                        },
                        {
                            field: 'link',
                            title: '链接'
                        },
                        {
                            field: 'wDirectPrice',
                            title: '微任务直发价'
                        },
                        {
                            field: 'wForwardPrice',
                            title: '微任务转发价'
                        },
                        {
                            field: 'directPrice',
                            title: '直发价'
                        },
                        {
                            field: 'forwardPrice',
                            title: '转发价'
                        },
                        {
                            field: 'createBy',
                            title: '登记人'
                        },
                        {
                            field: 'remark',
                            title: '备注'
                        }]
                };
                $.table.destroy('media-table');
                $.table.init(options);

                break;
            case "3":
                pre = pre + "work/wx";
                options = {
                    url: pre + "/list",
                    id: "media-table",
                    queryParams: queryParams,
                    showSearch: false,
                    showRefresh: false,
                    showToggle: false,
                    showColumns: false,
                    columns: [{
                        checkbox: true
                    },
                        {
                            field: 'mediaId',
                            title: '媒体ID'
                        },
                        {
                            field: 'mediaName',
                            title: '微信名称'
                        },
                        {
                            field: 'wxNo',
                            title: '微信号'
                        },
                        {
                            field: 'province',
                            title: '省份'
                        },
                        {
                            field: 'city',
                            title: '地市'
                        },
                        {
                            field: 'category',
                            title: '分类',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(categoryDatas, value);
                            }
                        },
                        {
                            field: 'fans',
                            title: '粉丝数(万)'
                        },
                        {
                            field: 'auth',
                            title: '认证',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(authDatas, value);
                            }
                        },
                        {
                            field: 'readCount',
                            title: '阅读量'
                        },
                        {
                            field: 'leadPrice',
                            title: '头条'
                        },
                        {
                            field: 'secondPrice',
                            title: '次条'
                        },

                        {
                            field: 'remark',
                            title: '备注'
                        },
                        {
                            field: 'createBy',
                            title: '登记人'
                        }]
                };
                $.table.destroy('media-table');
                $.table.init(options);

                break;
            case "4":
                pre = pre + "work/plane";
                options = {
                    url: pre + "/list",
                    id: "media-table",
                    queryParams: queryParams,
                    showSearch: false,
                    showRefresh: false,
                    showToggle: false,
                    showColumns: false,
                    columns: [{
                        checkbox: true
                    },
                        {
                            field: 'mediaId',
                            title: '媒体ID'
                        },
                        {
                            field: 'mediaName',
                            title: '媒体名称'
                        },
                        {
                            field: 'province',
                            title: '省份'
                        },
                        {
                            field: 'city',
                            title: '地市'
                        },
                        {
                            field: 'industry',
                            title: '行业',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(industryDatas, value);
                            }
                        },
                        {
                            field: 'isMaster',
                            title: '是否主报',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(isMasterDatas, value);
                            }
                        },
                        {
                            field: 'price',
                            title: '单价'
                        },

                        {
                            field: 'remark',
                            title: '备注'
                        },
                        {
                            field: 'createBy',
                            title: '登记人'
                        }]
                };
                $.table.destroy('media-table');
                $.table.init(options);

                break;
            case "5":
                pre = pre + "work/app";
                options = {
                    url: pre + "/list",
                    id: "media-table",
                    queryParams: queryParams,
                    showSearch: false,
                    showRefresh: false,
                    showToggle: false,
                    showColumns: false,
                    columns: [{
                        checkbox: true
                    },
                        {
                            field: 'mediaId',
                            title: '媒体ID'
                        },
                        {
                            field: 'mediaName',
                            title: '媒体名称'
                        },
                        {
                            field: 'platform',
                            title: '平台',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(platformDatas, value);
                            }
                        },

                        {
                            field: 'industry',
                            title: '行业',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(industryDatas, value);
                            }
                        },
                        {
                            field: 'price',
                            title: '价格'
                        },
                        {
                            field: 'mediaCase',
                            title: '案例'
                        },
                        {
                            field: 'publish',
                            title: '出稿日期',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(publishDatas, value);
                            }
                        },
                        {
                            field: 'link',
                            title: '链接'
                        },
                        {
                            field: 'vOriginal',
                            title: '加V原创',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(vOriginalDatas, value);
                            }
                        },
                        {
                            field: 'fans',
                            title: '粉丝数'
                        },
                        {
                            field: 'weekendPress',
                            title: '周末发稿',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(weekendPressDatas, value);
                            }
                        },

                        {
                            field: 'createBy',
                            title: '登记人'
                        },
                        {
                            field: 'remark',
                            title: '备注'
                        }]
                };
                $.table.destroy('media-table');
                $.table.init(options);

                break;
            case "6":
                pre = pre + "work/flow";
                options = {
                    url: pre + "/list",
                    id: "media-table",
                    queryParams: queryParams,
                    showSearch: false,
                    showRefresh: false,
                    showToggle: false,
                    showColumns: false,
                    columns: [{
                        checkbox: true
                    },
                        {
                            field: 'mediaId',
                            title: '媒体ID'
                        },
                        {
                            field: 'platform',
                            title: '平台',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(platformDatas, value);
                            }
                        },
                        {
                            field: 'category',
                            title: '分类',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(categoryDatas, value);
                            }
                        },
                        {
                            field: 'isDirect',
                            title: '是否直营',
                            formatter: function (value, row, index) {
                                return $.table.selectDictLabel(isDirectDatas, value);
                            }
                        },
                        {
                            field: 'createBy',
                            title: '登记人'
                        },
                        {
                            field: 'remark',
                            title: '备注'
                        }]
                };
                $.table.destroy('media-table');
                $.table.init(options);

                break;
            default:
                alert('error')
        }
    }


</script>
</body>
</html>
<!-- 价格类型 -->
<script id="priceTypeTpl" type="text/x-jquery-tmpl">
<div>
<select class='form-control' name='papers[${index}].priceType' onchange='priceChange(${index},this.value)'>
    <option value="">所有</option>
    <option value="1" {{if type==="1"}}selected{{/if}}>微任务直发价</option>
    <option value="2" {{if type==="2"}}selected{{/if}}>微任务转发价</option>
    <option value="3" {{if type==="3"}}selected{{/if}}>直发价</option>
    <option value="4" {{if type==="4"}}selected{{/if}}>转发价</option>
    <option value="5" {{if type==="5"}}selected{{/if}}>头条</option>
    <option value="6" {{if type==="6"}}selected{{/if}}>次条</option>
</select>
</div>





</script>